import React, {Component} from 'react';
import {connect} from 'react-redux'

import './index.scss';

class CommunityForm extends Component {
  // 返回上一页
  goBack = () => {
    this.props.history.goBack();
  }
  // 发表
  toPublish = () => {}
  //  获取用户输入
  getFormVal = () => {

  }

  render() {
    return (
      <section className="form-container">
        <div className="top-action">
          <span onClick={this.goBack} className="item">返回</span>
          <span onClick={this.toPublish} className="send-btn">发表</span>
        </div>
        <div className="seat" />

        <div className="form-content">
          <textarea name="" id="" cols="30" rows="10" className="form-ipt" placeholder="记录些什么吧..." onChange={this.getFormVal}/>
        </div>
      </section>
    )
  }
}

const mapStateToProps = state => {
  return {
    userInfo: state.userInfo
  }
}
export default connect(mapStateToProps)(CommunityForm)
